<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 狗崽子
  Date: 2022/4/10
  Time: 17:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String basePath=request.getScheme()+"://"+request.getServerName()+":"
            +request.getServerPort()+request.getContextPath()+"/";
%>
<html>
<head>
    <title>支出清单</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- 引入 Bootstrap -->
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"rel="stylesheet">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>

<body>
<nav class="navbar navbar-default" role="navigation">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse"
                    data-target="#example-navbar-collapse">
                <span class="sr-only">切换导航</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">管理员模块</a>
        </div>
        <div class="collapse navbar-collapse" id="example-navbar-collapse">
            <ul class="nav navbar-nav">
                <li><a href="<%=basePath%>book/allBook">项目资金筹集统计</a></li>
                <li><a href="<%=basePath%>buuk/allBuuk">班费筹集立项与发布</a></li>
                <li  class="active" class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        班费收支统计 <b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a href="<%=basePath%>income/allIncome">收入清单列表页</a></li>
                        <li class="divider"></li>
                        <li><a href="<%=basePath%>outcome/allOutcome">支出清单列表页</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
</nav>
<div class="container">

    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="page-header">
                <h1>
                    <small>支出清单 —— 显示所有支出</small>
                </h1>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-4 column">
            <a class="btn btn-primary" href="${pageContext.request.contextPath}/outcome/toAddOutcome">新增</a>
        </div>
    </div>

    <div class="row clearfix">
        <div class="col-md-12 column">
            <table class="table table-hover table-striped">
                <thead>
                <tr>
                    <th>支出编号</th>
                    <th>支出金额</th>
                    <th>支出用途</th>
                    <th>支出时间</th>
                    <th>支出项目</th>
                    <th>负责人</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach var="outcome" items="${list}">
                    <tr>
                        <td>${outcome.outcomeID}</td>
                        <td>${outcome.outcomeAmount}</td>
                        <td>${outcome.outcomeUse}</td>
                        <td>${outcome.outcomeTime}</td>
                        <td>${outcome.outcomeProjects}</td>
                        <td>${outcome.leader}</td>
                        <td>
                            <a href="${pageContext.request.contextPath}/outcome/toUpdateOutcome?id=${outcome.outcomeID}">更改</a> |
                            <a href="${pageContext.request.contextPath}/outcome/del/?id=${outcome.outcomeID}">删除</a>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>

    </div>

    <div class="row">
        <div class="col-md-4 column">
            <a class="btn btn-default" href="${pageContext.request.contextPath}/cell/teacher.jsp">返回</a>
        </div>
    </div>
</div>
</body>
</html>
